package com.yuanzong.wuliu.controller.app.base;

import com.yuanzong.wuliu.common.vo.ApiResult;
import com.yuanzong.wuliu.service.app.base.AppCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "App端 - 验证码模块")
@RequestMapping("/app/base/code")
@Slf4j
public class AppCodeController {

    @Autowired
    private AppCodeService appCodeService;

    @ApiOperation("图片验证码")
    @RequestMapping(value = "/photo", method = {RequestMethod.GET})
    public ApiResult photo(String photoCodeKey) throws Exception {
        ApiResult result = appCodeService.photo(photoCodeKey);
        return result;
    }

}
